<?php
use HyperfStore\Route\Route;

Route::post('/login', 'IndexController@login');
Route::post('/upload', 'IndexController@upload');
Route::post('/upload/file', 'IndexController@uploadFile');
        
Route::middleware('auth', 'auth_admin')->group(function () {
    Route::get('/info', 'IndexController@info');
    
    Route::get('/config', 'ConfigController@index');
    Route::put('/config', 'ConfigController@update');
    
    Route::get('/admin', 'AdminController@index');
    Route::post('/admin', 'AdminController@create');
    Route::put('/admin/{id}', 'AdminController@update');
    Route::delete('/admin/{id}', 'AdminController@delete');
    
    Route::get('/level', 'LevelController@index');
    Route::put('/level/{id}', 'LevelController@update');
    
    Route::get('/user', 'UserController@index');
    Route::put('/user/{id}', 'UserController@update');
    Route::post('/user/money/{id}', 'UserController@money');
    Route::post('/user/money_all/{id}', 'UserController@moneyAll');
    Route::post('/user/money_remain_time/{id}', 'UserController@moneyRemainTime');
    Route::get('/user/order/remain/{id}', 'UserController@orderRemain');
    Route::get('/user/log', 'UserController@log');
    Route::get('/user/transfer', 'UserController@transfer');
    
    Route::get('/user/out', 'UserOutController@index');
    Route::get('/user/out/ok/{id}', 'UserOutController@ok');
    Route::get('/user/out/no/{id}', 'UserOutController@no');
    
    Route::get('/product/menu', 'ProductMenuController@index');
    Route::post('/product/menu', 'ProductMenuController@create');
    Route::put('/product/menu/{id}', 'ProductMenuController@update');
    Route::delete('/product/menu/{id}', 'ProductMenuController@delete');
    
    Route::get('/product', 'ProductController@index');
    Route::post('/product', 'ProductController@create');
    Route::put('/product/{id}', 'ProductController@update');
    Route::delete('/product/{id}', 'ProductController@delete');
    
    Route::get('/order', 'OrderController@index');
    Route::post('/order/express/{id}', 'OrderController@express');
    
    Route::get('/total/user', 'TotalController@user');
    Route::get('/total/order', 'TotalController@order');
    Route::get('/total/user/log', 'TotalController@userLog');
    
    Route::get('/images', 'ImagesController@index');
    Route::post('/images', 'ImagesController@create');
    Route::put('/images/{id}', 'ImagesController@update');
    Route::delete('/images/{id}', 'ImagesController@delete');
    
    Route::get('/news', 'NewsController@index');
    Route::post('/news', 'NewsController@create');
    Route::put('/news/{id}', 'NewsController@update');
    Route::delete('/news/{id}', 'NewsController@delete');
    
    Route::get('/video', 'VideoController@index');
    Route::post('/video', 'VideoController@create');
    Route::put('/video/{id}', 'VideoController@update');
    Route::delete('/video/{id}', 'VideoController@delete');
    
    Route::get('/mall', 'MallController@index');
    Route::post('/mall', 'MallController@create');
    Route::put('/mall/{id}', 'MallController@update');
    Route::delete('/mall/{id}', 'MallController@delete');
    
    Route::get('/mall/goods', 'MallGoodsController@index');
    Route::post('/mall/goods', 'MallGoodsController@create');
    Route::put('/mall/goods/{id}', 'MallGoodsController@update');
    Route::delete('/mall/goods/{id}', 'MallGoodsController@delete');
    Route::post('/mall/goods/status/{id}', 'MallGoodsController@status');
    
    Route::get('/mall/order', 'MallOrderController@index');
    Route::post('/mall/order/express/{id}', 'MallOrderController@express');
    Route::get('/mall/order/settle', 'MallOrderController@settle');
    Route::post('/mall/order/settle/ok', 'MallOrderController@settleOk');
    
    Route::get('/mall/shop', 'MallShopController@index');
    Route::put('/mall/shop/{id}', 'MallShopController@update');
    
});